/*
 * @Author: juneChen && junechen_0606@163.com
 * @Date: 2023-06-02 15:45:53
 * @LastEditors: juneChen && juneswoole@163.com
 * @LastEditTime: 2023-09-20 11:54:27
 * @Description: 业务相关 数据字典
 * 
 */

export default {
    namespaced: true,
    state: {
        // 代理IP账号状态
        agencyIpStatus: [
            {
                value: 'Unactivated',
                label: "未开通",
                color: 'orange'
            },{
                value: 'Normal',
                label: "正常",
                color: 'green'
            },
            {
                value: 'Abnormal',
                label: "异常",
                color: 'orange'
            },
            {
                value: 'Forbidden',
                label: "禁用",
                color: 'red'
            }
        ] 
    },
    getters: {
        businessStateLabel : (state) => (name,value) => {
            var label = "";
            state[name].forEach(element => {
                if(element.value == value){
                    label = element.label;
                }
            });
            return label;
        }
    }
}